<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Models\Shop\Product;
use App\Http\Controllers\Controller;


class WechatController extends Controller
{
    function index()
    {
        //$user = session('wechat.oauth_user');

        //dump($user) ;
        //return session('customer');
        //return 1234;
        $products = Product::where('is_recommend', true)->orderBy('is_top', 'desc')->orderBy('sort_order')->get();
        //return $products;
        return view('home.index')->with('products',$products);
    }

    

}
